<?php
class user_role_1 extends Update_Model_Database_AbstractChange{

	protected $comment="Создание таблицы user_role";

	public function up(){
		$sql='CREATE TABLE IF NOT EXISTS user_role(
				  id INT(11) NOT NULL AUTO_INCREMENT,
				  label TEXT DEFAULT NULL,
				  description TEXT DEFAULT NULL,
				  resources TEXT DEFAULT NULL,
				  alias TEXT DEFAULT NULL,
				  PRIMARY KEY (id)
			)
				ENGINE = INNODB
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);
	}

	public function down(){
		$sql='DROP TABLE IF EXISTS user_role;';
		$this->db->query($sql);
	}

}